import { Button, Space, Table } from "antd"
import { ColumnsType } from "antd/es/table"
import React from "react"
import SaveSupplier from "./components/SaveSupplier"
import { useAntdModal } from "@web-design/ui"
const list = [
{
    platform:'clipdrop',
    apiPath:'https://clipdrop-api.co/text-to-image/v1',
    method:'POST',
    status:'1',
    contentType:'application/json'
},
{
    platform:'腾讯',
    apiPath:'https://ai.qq.com/api/text-to-image',
    method:'POST',

    status:'1',
    contentType:'application/json'
}
]
const App = ()=>{
    const saveSupplier = useAntdModal()
const columns:ColumnsType<any> = [
    {
        title:'平台名称',
        dataIndex:'platform'
    },
    {
        title:'请求路径',
        dataIndex:'apiPath'
    },
    {
        title:'请求方式',
        dataIndex:'method'
         
    },
    {
        title:'请求类型',
        dataIndex:'contentType'
        
    },{
        title:'状态',
        dataIndex:'status'
        
    },{
        title:'操作',
        render(value, record, index) {
            return <Space>
                {/* <Button type="link">设置授权</Button> */}
                <Button type="link">编辑</Button>
            </Space>
        },
    }
]
return <div>
    <SaveSupplier {...saveSupplier}/>
    <Table dataSource={list} columns={columns}/>
</div>
}
export default App